<template>
	<!-- personnellist 人员列表 -->
	<view class="r_list">
		<view class="item">
			<view class="title">成员信息</view>
			<view class="title">店铺职位</view>
		</view>
		<view class="item" v-for="(item,index) in list" :key="item.uid"  @click="$navTo('/pages/groupmenu/jurisdiction?uid='+uid+'&id='+item.mid)">
			<image :src="item.avatar"></image>
			<view class="info">
				<view class="tit">{{item.nickname}}</view>
				<view class="phone">{{item.mobile}}</view>
			</view>
			<view class="type" :class="{'type1':item.isman=='店长'}">{{item.isman}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				uid: '',
				isback: '',
				list: [],
			}
		},
		onLoad(option) {
			this.isback = option.isback;
			this.uid = option.uid;
			this.getList();
		},
		methods: {
			getList() {
				this.$axios('groupManager/supManList', 'POST', 'supplier', {
					uid: this.uid
				}).then(res => {
					if (res.data.code == 200) {
						this.list = res.data.data;
					}
				})
			}
		},
		onBackPress(e) {
			if (e.from == "backbutton" && this.isback) {
				this.$navBack(2);
				return true;
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #F8F8F8;
		padding-bottom: 60rpx;
	}
	.r_list{
		margin: 20rpx;
		padding: 30rpx;
		background: #FFFFFF;
		border-radius: 12rpx;
		.item{
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-bottom: 40rpx;
			.title{
				font-size: 32rpx;
				color: #333333;
				font-weight: 600;
			}
			image{
				width: 92rpx;
				height: 92rpx;
				border-radius: 50%;
			}
			.info{
				padding-left: 20rpx;
				flex: 1;
				.tit{
					font-size: 28rpx;
					color: #333333;
					font-weight: 600;
					margin-bottom: 6rpx;
				}
				.phone{
					font-size: 24rpx;
					color: #666666;
				}
			}
			.type{
				font-size: 28rpx;
				color: #333333;
			}
			.type1{
				width: 110rpx;
				height: 60rpx;
				background: #F3E4FF;
				border-radius: 30rpx;
				font-weight: 600;
				color: #8615E1;
				text-align: center;
				line-height: 60rpx;
			}
		}
	}
	.r_item {
		background-color: #fff;
		display: flex;
		align-items: center;
		padding: 20upx;
		margin-top: 20upx;
	}

	.r_item image {
		border-radius: 10upx;
		height: 100upx;
		width: 100upx;
	}

	.r_info {
		padding: 0 20upx;
		flex: 1;
		line-height: 50upx;
	}

	.r_operation button {
		display: block;
		margin-bottom: 10upx;
	}

	.r_empty {
		color: $font-color-spec;
		text-align: center;
		margin: 40upx;
	}
</style>
